export default {
  // 存储本地数据
  set: (key: string, value: unknown) => {
    return localStorage.setItem(key, JSON.stringify(value));
  },
  // 获取本地数据
  get: (key: string) => {
    return JSON.parse(localStorage.getItem(key) || "{}");
  },
  // 删除本地数据
  remove: (key: string) => {
    return localStorage.removeItem(key);
  },
  // 清空本地数据
  clear: () => {
    return localStorage.clear();
},
};
